-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(continuous-deploy-fingerprint): Add optional environment input for EAS updates #316
base: main
Are you sure you want to change the base?
Conversation
Hi @wschurman, I'd appreciate your review on this PR. A couple of quick notes:
Thanks for your help! |
Yep, this happens for external contributions. No worries.
I added myself as a reviewer. I should have time to review in the next few days. I think we need to ensure that both this and the call here both use the same env variables since they could be in the app.json. And then we also probably need a way to guarantee that they are the same ones as the eas build profile uses? I'll put some more thought into this in the next couple days. |
Ah, this is something that I missed, thanks for bringing this up! I actually haven't referenced any variables in This brings up an interesting question though: Should the fingerprint change when a JS bundle env var changes? For variables specified in app.json (like
Based on the documentation, this seems to be already handled. The environment variables are made available based on the active profile, so no additional work should be needed on our end. The main issue was with updates. With updates:
This explains why in my Supabase implementation, while the environment variables were available during build time, they weren't accessible via process.env during update publishing since they weren't present during that phase.
I really appreciate your feedback and time on this! And please excuse any misunderstandings on my part – I'm still quite new to this ecosystem. |
The fingerprint runtime version is used to declare precise compatibility between builds and updates, so if something changes the build runtime version the only way to guarantee compatibility is if the update runtime version is also changed. Anything that changes the build changes the fingerprint by default, though all users have the ability to exclude things from fingerprint if they wish via the provided exclusion mechanisms to set up custom rules for excluding certain changes from changing the fingerprint.
Sorry, I should have been more precise. I more meant guarantee/require that the "environment" string provided here matches the "environment" string in the eas.json profile. This way, if the build profile specifies an environment we can throw a warning if the "environment" flag you add isn't provided. |
Asking internally how we recommend fixing this for EAS environment variables, will get back to you in a few days. |
@tharakadesilva - I added some code that should theoretically load environment variables for execution of the |
Linked issue
expo/eas-cli#2195
Additional context
https://docs.expo.dev/eas/environment-variables/#eas-update